﻿// KittyFeral PVE - HB Routine for FeralDruid 5.4 - By Neyia
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.Routines;
using Styx.Pathing;
using Styx.TreeSharp;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Action = Styx.TreeSharp.Action;

namespace KittyFeral
{
    public partial class Main : CombatRoutine
    {
        Composite LowbieCat()
        {
            return 
                new PrioritySelector(
                new Decorator(ret => Paused, PauseCR()),
                        Cast(CAT_FORM, ret => Me.Shapeshift != ShapeshiftForm.Cat),
                        new Decorator(ret => gotTarget && !Me.IsSafelyFacing(Me.CurrentTarget), new Action(delegate { Me.CurrentTarget.Face(); return RunStatus.Failure; })),
                        CastOnMe(REJUVENATION, ret => !buffExists(REJUVENATION, Me) && Me.HealthPercent <= CRSettingsCat.myPrefs.RejuvenationCombat),
                        Cast(WAR_STOMP, ret => 
                            gotTarget && Me.Race == WoWRace.Tauren 
                            && !spellOnCooldown(WAR_STOMP) 
                            && Me.CurrentTarget.IsCasting 
                            && CRSettingsCat.myPrefs.AutoInterrupt && LastSpell != MIGHTY_BASH && LastSpell != SKULL_BASH && Me.CurrentTarget.IsWithinMeleeRange),
                
                        CastMelee(FEROCIOUS_BITE, ret => gotTarget && Me.ComboPoints >= 3 && Me.CurrentTarget.IsWithinMeleeRange),
                        CastMelee(RAKE, ret => gotTarget && !debuffExists(RAKE, Me.CurrentTarget) && Me.CurrentTarget.IsWithinMeleeRange),
                        CastMelee(MANGLE, ret => gotTarget && Me.CurrentTarget.IsWithinMeleeRange)
                );
        }
    }
}
